forked from Akryum/meteor-vite
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vite Bundler v3 #173
Draft
JorgenVatle
wants to merge
440
commits into
release
Choose a base branch
from
v3
base: release
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Vite Bundler v3 #173
+1,568
−624
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…environment variables for setting the base path and URL for assets
Releases: vite-bundler@3.0.0-next.8 [skip ci]
Version Packages (next)
…environment variables for setting the base path and URL for assets
Releases: meteor-vite@2.0.0-next.1 [skip ci]
Version Packages (next)
…tially read-only program.json file.
… write to the target arch's program.json file which could be marked as read-only.
Releases: vite-bundler@3.0.0-next.9 [skip ci]
Version Packages (next)
Releases: meteor-vite@2.0.0-next.7 [skip ci]
Version Packages (next)
This was referenced Nov 2, 2024
This reverts commit da13647.
Releases: meteor-vite@2.0.0-next.8 vite-bundler@3.0.0-next.22 [skip ci]
Version Packages (next)
…ker child process disconnects despite having an active DDP connection to the worker.
Releases: vite-bundler@3.0.0-next.23 [skip ci]
Version Packages (next)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Try the preview build
You can check the latest available version on Packosphere
⚡ Making Meteor be more like Vite
Working around Isopack entirely, your Meteor builds are now (almost) entirely handled by Vite. Meteor will no longer try to process your client app. Instead your client app is bundled as raw static files and served as-is by Meteor's webapp.
Now, the only client-side assets built by Meteor are Meteor's own client-side dependencies and any Atmosphere dependencies your project depends on.
Improved caching & module preloading
Added support for module preloading and edge/CDN-caching for dynamic imports. Something not previously possible or easily achievable with Meteor's native dynamic imports which relies mostly on DDP and client-side caching.
Much faster production builds.
Prior to this release, Vite's build output would have to be transpiled and fed back into Meteor as normal JS and CSS files. This was originally done to ensure some level compatibility with the Meteor ecosystem and it's implementation for dynamic imports.
Essentially, when building for production, you'd end up with your app being bundled and processed twice. Despite the extra build step, Meteor-Vite would still speed up the build process for most apps as a lot of the load would be taken off of Isobuild, Meteor's internal build system.
But Isobuild was still holding things back. When Vite would take approximately 2 seconds to build a small app, Meteor would spend roughly 10 - 15 seconds parsing and minifying that tiny bundle created by Vite.
(todo add build benchmark pre v3 and post v3)
Migration steps and breaking changes
Upgrading to
v3
shouldn't require any changes to your application. But there are some changes that could potentially impact your users./vite-assets/<chunkFileName>.<css | js>
assetsBaseUrl
in yourmeteor-vite
plugin config.